Add per-project scope option and fix interactive sudo prompt#10
Open
peter-wagstaff wants to merge 2 commits intofjktkm:mainfrom
Open
Add per-project scope option and fix interactive sudo prompt#10peter-wagstaff wants to merge 2 commits intofjktkm:mainfrom
peter-wagstaff wants to merge 2 commits intofjktkm:mainfrom
Conversation
Use sudo -n so the scripts fail silently instead of blocking on a password prompt in containers without passwordless sudo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a "scope" option (default: "shared") that controls whether all
containers share the same persistence data or each gets an isolated
subdirectory within the volume keyed by DEVCONTAINER_ID.
When scope is "per-project", the scripts use
/mnt/agent-persistence/$DEVCONTAINER_ID/ instead of the volume root.
This requires DEVCONTAINER_ID to be set in the project's containerEnv
since ${devcontainerId} substitution is not supported in feature
containerEnv metadata.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Motivation
When using agent-persistence across multiple projects, all containers share the same volume, which means conversation history, plugin configs, and cached setup state bleed between projects. The new per-project scope creates isolated subdirectories within the volume keyed by DEVCONTAINER_ID, so each workspace gets its own data while still sharing a single Docker volume.
Changes
Usage
Note: per-project scope requires DEVCONTAINER_ID in the project's containerEnv because ${devcontainerId} substitution is not supported in feature
containerEnv metadata:
Without this, the feature falls back to shared scope.
Backwards Compatibility
Default behavior is unchanged, scope defaults to shared, which uses the volume root exactly as before.